<?php
/**
 * 黑名单模块
 */
namespace app\admin\controller;

use app\common\controller\AdminBase;
use app\common\util\WechatUtil;
use app\common\model\WxUser;
use think\Db;

class Blacklist extends AdminBase
{
    protected $wechat_obj;
    protected $config;

    protected function _initialize(){
        parent::_initialize();
        $this->wx_user_model = new WxUser;
        $this->config = $this->wx_user_model->find();
        $this->wechat_obj = new WechatUtil($this->config);
    }

    public function index(){
        return $this->fetch();
    }

    /**
     * 黑名单管理
     */
    public function getBkList($beginOpenid = ''){
        $wechat_obj = $this->wechat_obj;
        $result = $wechat_obj->getBlackList($beginOpenid);
        return json($result);
    }

    
}